﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace Utility.Model
{
    /// <summary>
    /// 功能实体
    /// </summary>
    [Serializable]
    public class Sys_Operate : Entity
    {
        /// <summary>
        /// 功能实体
        /// </summary>
        public Sys_Operate()
            : base("Sys_Operate")
        {
            this._OperateID = Guid.NewGuid().ToString();
            this._CreateDate = Utility.ConvertHelper.GetNowDateTime();
            this._IsDelete = false;
        }

        #region Model
        private string _OperateID;
        private string _OperateName;
        private string _OperateValue;
        private string _OperateDes;
        private bool? _IsDelete;
        private string _CssCss;
        private string _CssCssGrid;
        private string _FunOption;
        private DateTime? _CreateDate;
        private string _CreateUser;
        /// <summary>
        /// 
        /// </summary>
        public string OperateID
        {
            get { return _OperateID; }
            set
            {
                this.OnPropertyValueChange(_.OperateID, _OperateID, value);
                this._OperateID = value;
            }
        }
        /// <summary>
        /// 功能名称
        /// </summary>
        public string OperateName
        {
            get { return _OperateName; }
            set
            {
                this.OnPropertyValueChange(_.OperateName, _OperateName, value);
                this._OperateName = value;
            }
        }
        /// <summary>
        /// 功能Code
        /// </summary>
        public string OperateValue
        {
            get { return _OperateValue; }
            set
            {
                this.OnPropertyValueChange(_.OperateValue, _OperateValue, value);
                this._OperateValue = value;
            }
        }
        /// <summary>
        /// 功能描述
        /// </summary>
        public string OperateDes
        {
            get { return _OperateDes; }
            set
            {
                this.OnPropertyValueChange(_.OperateDes, _OperateDes, value);
                this._OperateDes = value;
            }
        }
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool? IsDelete
        {
            get { return _IsDelete; }
            set
            {
                this.OnPropertyValueChange(_.IsDelete, _IsDelete, value);
                this._IsDelete = value;
            }
        }
        /// <summary>
        /// 样式名称
        /// </summary>
        public string CssCss
        {
            get { return _CssCss; }
            set
            {
                this.OnPropertyValueChange(_.CssCss, _CssCss, value);
                this._CssCss = value;
            }
        }
        /// <summary>
        /// 样式名称
        /// </summary>
        public string CssCssGrid
        {
            get { return _CssCssGrid; }
            set
            {
                this.OnPropertyValueChange(_.CssCssGrid, _CssCssGrid, value);
                this._CssCssGrid = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string FunOption
        {
            get { return _FunOption; }
            set
            {
                this.OnPropertyValueChange(_.FunOption, _FunOption, value);
                this._FunOption = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? CreateDate
        {
            get { return _CreateDate; }
            set
            {
                this.OnPropertyValueChange(_.CreateDate, _CreateDate, value);
                this._CreateDate = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string CreateUser
        {
            get { return _CreateUser; }
            set
            {
                this.OnPropertyValueChange(_.CreateUser, _CreateUser, value);
                this._CreateUser = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
				_.OperateID};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.OperateID,
				_.OperateName,
				_.OperateValue,
				_.OperateDes,
				_.IsDelete,
				_.CssCss,
				_.CssCssGrid,
				_.FunOption,
				_.CreateDate,
				_.CreateUser};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._OperateID,
				this._OperateName,
				this._OperateValue,
				this._OperateDes,
				this._IsDelete,
				this._CssCss,
				this._CssCssGrid,
				this._FunOption,
				this._CreateDate,
				this._CreateUser};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._OperateID = DataUtils.ConvertValue<string>(reader["OperateID"]);
            this._OperateName = DataUtils.ConvertValue<string>(reader["OperateName"]);
            this._OperateValue = DataUtils.ConvertValue<string>(reader["OperateValue"]);
            this._OperateDes = DataUtils.ConvertValue<string>(reader["OperateDes"]);
            this._IsDelete = DataUtils.ConvertValue<bool?>(reader["IsDelete"]);
            this._CssCss = DataUtils.ConvertValue<string>(reader["CssCss"]);
            this._CssCssGrid = DataUtils.ConvertValue<string>(reader["CssCssGrid"]);
            this._FunOption = DataUtils.ConvertValue<string>(reader["FunOption"]);
            this._CreateDate = DataUtils.ConvertValue<DateTime?>(reader["CreateDate"]);
            this._CreateUser = DataUtils.ConvertValue<string>(reader["CreateUser"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._OperateID = DataUtils.ConvertValue<string>(row["OperateID"]);
            this._OperateName = DataUtils.ConvertValue<string>(row["OperateName"]);
            this._OperateValue = DataUtils.ConvertValue<string>(row["OperateValue"]);
            this._OperateDes = DataUtils.ConvertValue<string>(row["OperateDes"]);
            this._IsDelete = DataUtils.ConvertValue<bool?>(row["IsDelete"]);
            this._CssCss = DataUtils.ConvertValue<string>(row["CssCss"]);
            this._CssCssGrid = DataUtils.ConvertValue<string>(row["CssCssGrid"]);
            this._FunOption = DataUtils.ConvertValue<string>(row["FunOption"]);
            this._CreateDate = DataUtils.ConvertValue<DateTime?>(row["CreateDate"]);
            this._CreateUser = DataUtils.ConvertValue<string>(row["CreateUser"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "Sys_Operate");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field OperateID = new Field("OperateID", "Sys_Operate", "OperateID");
            /// <summary>
            /// 功能名称
            /// </summary>
            public readonly static Field OperateName = new Field("OperateName", "Sys_Operate", "功能名称");
            /// <summary>
            /// 功能Code
            /// </summary>
            public readonly static Field OperateValue = new Field("OperateValue", "Sys_Operate", "功能Code");
            /// <summary>
            /// 功能描述
            /// </summary>
            public readonly static Field OperateDes = new Field("OperateDes", "Sys_Operate", "功能描述");
            /// <summary>
            /// 是否删除
            /// </summary>
            public readonly static Field IsDelete = new Field("IsDelete", "Sys_Operate", "是否删除");
            /// <summary>
            /// 样式名称
            /// </summary>
            public readonly static Field CssCss = new Field("CssCss", "Sys_Operate", "样式名称");
            /// <summary>
            /// 样式名称
            /// </summary>
            public readonly static Field CssCssGrid = new Field("CssCssGrid", "Sys_Operate", "样式名称");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field FunOption = new Field("FunOption", "Sys_Operate", "FunOption");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field CreateDate = new Field("CreateDate", "Sys_Operate", "CreateDate");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field CreateUser = new Field("CreateUser", "Sys_Operate", "CreateUser");
        }
        #endregion


    }
}

